<template>
  <div class="all">
    <layheade>
      <span slot="head-title" class="head-title">意见反馈</span>
      <span slot="submit" class="submit" @click="subFee">提交</span>
    </layheade>
    <div class="con">
      <div class="idea">
        <h3>你的意见和反馈</h3>
        <textarea
          placeholder="请把您的想法和意见写在这里~"
          maxlength="200"
          @input="descInput"
          v-model="desc"
          style="resize:none;"
        />
        <span class="numberV">{{txtVal}}/200</span>
      </div>
      <div class="idea">
        <h3>您的联系方式</h3>
        <textarea
          placeholder="请把您的联系方式写在这里~"
          maxlength="30"
          @input="celldescInput"
          v-model="celldesc"
          style="resize:none;"
          class="twoarea"
        />
        <span class="numberV">{{celltxtVal}}/30</span>
      </div>
    </div>
  </div>
</template>

<script>
import layheade from "../components/layheade";
export default {
  name: "feedback",
  components: {
    layheade
  },
  data() {
    return {
      txtVal: 0,
      desc: "",
      celltxtVal: 0,
      celldesc: ""
    };
  },
  methods: {
    descInput() {
      this.txtVal = this.desc.length;
    },
    celldescInput() {
      this.celltxtVal = this.celldesc.length;
    },
    subFee() {
      this.$router.push({ path: "feedbackSuccess" });
    }
  }
};
</script>

<style lang="less" scoped>
.all {
  background-color: #f8f8f8ff;

  width: 100%;
  height: 100%;
}
.con {
  .idea {
    background-color: #fff;
    padding: 21px;
    &:nth-child(2) {
      margin-top: 20px;
    }
  }
  textarea {
    width: 100%;
    border: none;
    height: 120px;
    font-size: 15px;
    &::-webkit-input-placeholder,
    textarea::-webkit-input-placeholder {
      color: #787878ff;
      font-size: 15px;
    }
    &:-moz-placeholder,
    textarea:-moz-placeholder {
      color: #787878ff;
      font-size: 15px;
    }
    &::-moz-placeholder,
    textarea::-moz-placeholder {
      color: #787878ff;
      font-size: 15px;
    }
    &:-ms-input-placeholder,
    textarea:-ms-input-placeholder {
      color: #787878ff;
      font-size: 15px;
    }
  }
  h3 {
    padding-left: 5px;
    border-left: 6px solid #c30d1eff;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
  }
  .numberV {
    float: right;
    font-size: 13px;
    color: #787878ff;
    margin-bottom: 13px;
  }
  .twoarea {
    height: 50px;
  }
}
</style>